﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Juli.Mes.Migrations
{
    /// <inheritdoc />
    public partial class addLadle : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Ladles",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    LadleCode = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    LadleName = table.Column<string>(type: "nvarchar(80)", maxLength: 80, nullable: true),
                    Description = table.Column<string>(type: "nvarchar(160)", maxLength: 160, nullable: true),
                    Rfid = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    Location = table.Column<string>(type: "nvarchar(160)", maxLength: 160, nullable: true),
                    Active = table.Column<bool>(type: "bit", nullable: false),
                    State = table.Column<int>(type: "int", nullable: false),
                    Age = table.Column<int>(type: "int", nullable: false, comment: "罐龄"),
                    GrossWeight = table.Column<double>(type: "float", nullable: false, comment: "毛重"),
                    SkinWeight = table.Column<double>(type: "float", nullable: false, comment: "皮重"),
                    Temperature = table.Column<double>(type: "float", nullable: false, comment: "温度"),
                    IsFull = table.Column<bool>(type: "bit", nullable: false, comment: "是否满罐"),
                    IsCap = table.Column<bool>(type: "bit", nullable: false, comment: "是否加盖"),
                    Material = table.Column<int>(type: "int", nullable: false),
                    UpWaterGapTime = table.Column<int>(type: "int", nullable: false, comment: "上水口次数"),
                    DownWaterGapTime = table.Column<int>(type: "int", nullable: false, comment: "下水口次数"),
                    SkateboardTime = table.Column<int>(type: "int", nullable: false, comment: "滑板次数"),
                    SlagLineTime = table.Column<int>(type: "int", nullable: false, comment: "渣线次数"),
                    MoltenBathTime = table.Column<int>(type: "int", nullable: false, comment: "熔池次数"),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Ladles", x => x.Id);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Ladles");
        }
    }
}
